#pragma once
#include "precompiled.h"
#include "Common.h"
#include "AssetDefines.h"

class Player;
class Scenery;
//class NPC;
class Model;
class Camera_Alt;

class World_Manager
{
public:
	World_Manager(void);
	~World_Manager(void);

	void load_world_from_dot( const char* path );

	void CreatePlayer();
	void Init_Player();

	 glm::mat4* GetCurrentCamera(  );

	void Update( GLdouble time );
	void SubmitToFrame( glm::mat4 &projview );

	// Get a reference to the player camera.
	static Camera_Alt const * GetPlayereCamera();

	// A stack for asynchronously requesting scenery rigid bodies from physics.
	static stack<Scenery*> async_requestRigidbodies_Scenery;

	// Our single player object.
	static Player *player;



private:
	void initialize();

	void add_Scenery( WORLD_SCENERY_ORDER &wso );

		void Clear_Scenery();
		void Clear_Player();

		void Dbg_InitWorld();
		void Dbg_DrawScenery( glm::mat4 &projview );


		typedef vector<Scenery*> scenery_vector;

		scenery_vector scenery;
	 	//vector<NPC*> npcs;
};